#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QEvent>
#include <QImage>
#include <QInputDialog>
#include <QMainWindow>
#include <QMessageBox>
#include <QMouseEvent>
#include <QPainter>
#include <QPoint>
#include <QString>
#include <QTimer>
#include <QWindowStateChangeEvent>

#include <memory>
#include <string>
#include <vector>

#include "install_window.h"

QT_BEGIN_NAMESPACE
namespace Ui {
class MainWindow;
}
QT_END_NAMESPACE

class MainWindow : public QMainWindow {
    Q_OBJECT

public:
    MainWindow(QWidget* parent = nullptr);
    ~MainWindow();

private:
    void OnClickMinimized();
    void OnClickClosed();
    void OnClickInstall();
    void OnChangeBgImg();
    void mousePressEvent(QMouseEvent* event) override;
    void mouseMoveEvent(QMouseEvent* event) override;

private:
    Ui::MainWindow* ui;
    QPoint dragPosition;
    QMessageBox msgBox {};
    QInputDialog inputDialog {};
    QString activeCode {};
    QTimer* changeImg;

    std::vector<std::string> imgList {};
    int bgIndex = 0;

    std::unique_ptr<InstallWindow> installWindow;
};
#endif // MAINWINDOW_H
